# TODO We really only support Linux builds now but all our dependencies
# support multiple platforms. Do proper platform detection and configuration

project('gits-r-us', 'cpp', 'c')

add_global_arguments(['-g3'], language : 'c')
add_global_arguments(['-g3'], language : 'cpp')

lib_includes = include_directories('lib')
thirdparty_includes = include_directories('thirdparty')

boost_dep = dependency('boost', modules : [
	'thread', 
	'asio'
])
libmicrohttpd_dep = dependency('libmicrohttpd', version: '>= 0.9.52')
thread_dep = dependency('threads')
libpqxx_dep = dependency('libpqxx')

subdir('thirdparty')
subdir('lib')

src = [
	'src/gits-r-us.cpp',
]

exe = executable(
	'gits-r-us', 
	src,
	dependencies: [
		boost_dep,
		libmicrohttpd_dep,
		thread_dep,
		libpqxx_dep,
	],
	link_with: [ 
		macaroons_lib, 
		nanomsg_lib
	],
	include_directories: [
		lib_includes,
		thirdparty_includes
	],
)

test('simple test', exe)
